{extend name="default/template/base_index" /}

{block name="area_header"}
<link rel="stylesheet" type="text/css" href="__CDN__/comp/wxuploader.css" />
<link type="text/css" rel="stylesheet" href="__CDN__/jquery-uploadify/3.2.1/uploadify.css" />
<script type="text/javascript" src="__CDN__/jquery-uploadify/3.2.1/jquery.uploadify.min.js"></script>
<style type="text/css">
	.banner.wxuploaderimg {width: 320px;height: 100px;}
	.banner.wxuploaderimg .img-preview img{width: 320px;}
</style>
{/block}

{block name="area_body"}
{include file="default/Widget/topbar" /}
<div class="admin-main container-fluid">
	{include file="default/Widget/left" /}
	<div class="admin-main-content">
		{include file="default/Widget/breadcrumb" /}

		<!-- 带验证 form -->
		<form class="form-horizontal well validateForm">
			<fieldset>
				<legend>视频链接添加</legend>
				<input type="hidden" class="required form-control input-short" name="id" id="id" value="{$info.id}" placeholder="图片标识,以示区别">
				<div class="form-group">
					<label for="inputtitle" class="col-md-2 col-lg-2 control-label">视频标题<br/></label>
					<div class="col-md-10 col-lg-10">
						<input type="text" class="required form-control input-short" name="name" id="name" value="{$info.name}" placeholder="图片标识,以示区别">
						<div class="help-block">(视频标题,以示区别)</div>
					</div>
				</div>
				<div class="form-group">
					<label for="inputtitle" class="col-md-2 col-lg-2 control-label">视频地址<br/></label>
					<div class="col-md-10 col-lg-10">
						<input type="text" class="required form-control input-short" name="url" id="url" value="{$info.url}" placeholder="图片标识,以示区别">
						<div class="help-block">(图片标识,以示区别)</div>
					</div>
				</div>


				<div class="form-group">
					<label class="col-md-2 col-lg-2 control-label">&nbsp;</label>
					<div class="col-lg-10 col-md-10">
						<a target-form="validateForm" onclick="getData();" class="ajax-post btn btn-primary" href="{:url('Video/edit')}" autofocus="autofocus"><i class="fa fa-save"></i>保存</a>
						<a class="btn btn-default" href="{:url('Video/index')}">
							<i class="fa fa-reply"></i>返回</a>
					</div>
				</div>
			</fieldset>
		</form>
	<!-- form -->

</div>
<!-- END admin-main-content -->
</div>
<!-- END admin-main-->
{/block}

{block name="area_footer"}
<script type="text/javascript">
	function getData(){
		var img = $(".wxuploaderimg img").attr("data-imageid");
		$("#img").val(img);
	}

	$(function(){
		wxuploadimg.init({cont:".wxuploaderimg"});
	});
</script>
{/block}